package org.abac4j.util;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.ArrayList;

public class AnnotationUtil {

	public static ArrayList<Method> getMethodsWithAnnotation(Class<?> clazz, Class<? extends Annotation> annotation){
		ArrayList<Method> methodList = new ArrayList<Method>();
		
		for(Method method : clazz.getMethods()){
			if(method.isAnnotationPresent(annotation)){
				methodList.add(method);
			}
		}
		
		return methodList;
	}
}
